package com.wnxy.service.impl;

import com.wnxy.dto.RoomDto;
import com.wnxy.model.Room;
import com.wnxy.mapper.RoomMapper;
import com.wnxy.service.RoomService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wnxy.util.BeanCopyUtil;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author alice
 * @since 2021-10-25
 */
@Service
public class RoomServiceImpl extends ServiceImpl<RoomMapper, Room> implements RoomService {

    @Override
    public List<RoomDto> getRoomList() {
        List<Room> rooms = list();

        return BeanCopyUtil.copyList(rooms,RoomDto.class);
    }
}
